﻿#pragma once


// CCheckProjectRunDialog 对话框

class CCheckProjectRunDialog : public CDialogEx
{
	DECLARE_DYNAMIC(CCheckProjectRunDialog)

public:
	CCheckProjectRunDialog(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CCheckProjectRunDialog();

protected:
	ck::CheckProject *m_pProject;
	ck::data::EnumDataset* m_pDatasets;

public:
	void	SetProject(ck::CheckProject *pProject);

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_CHECK_PROJECT_RUN };
#endif

public:
	int m_nCount;
	BOOL m_bAsync;
	ck::ckDataProductType m_productType;

	CString m_strProjName;
	CString m_strDatasetCount;
	CString m_strOutputPath;

	//CTextProgressCtrl m_progressBar;
	CProgressCtrl m_progressBar;

	ck::check::CheckResultSet* m_pResultSet;

protected:
	void	DoEvent();
	void	DisableControls();
	void	EnableControls();

	void	Check(ck::data::Dataset* pDataset, ck::CheckCase* pCase);
public:
	void	Run();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	virtual BOOL OnInitDialog();

	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedBtnOutputPath();
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedCancel();

	afx_msg LRESULT OnUpdateProgressCtrl(WPARAM wParam, LPARAM lParam);
};
